<?php

include_once("../model/Model.php");
$comment = $_POST['textarea6'];
$title = $_POST['docTitle'];
$privacy = $_POST['Radio15'];
$category = $_POST['doctestinput'];
if($title == "")
{
	$title = $_FILES['docFile']['name'];
}
$filename = $_FILES['docFile']['name'];
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); 

$model = new Model();
$ans = $model->docFileUpload(urlencode($comment),urlencode($title),$ext,$privacy,$category);

echo  "<script>top.docUploadComplete('".$ans[0]."','".$title."','".$comment."','".$filename."','".$ans[1]."','".$privacy."','".$category."');</script>";


?>
